<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('入库端提伸机监控')"/>
    <th:block th:include="include :: layout-latest-css"/>
    <th:block th:include="include :: ztree-css"/>
    <!--    <link rel="stylesheet" type="text/css" href="/css/bootstrap-switch.min.css">-->
</head>
<body class="gray-bg">
<div class="ui-layout-center">
    <div class="container-div">
        <div class="row col-sm-12" style="height: 35%;width: 26%" >
            <div id="div1" style="height: 100%;width: 100%" >
                <table id="bootstrap-table1" class="col-sm-5 select-table"></table>
            </div>
<!--            <div id="div11" style="height: 100%;width: 100%" >-->
<!--                <table id="bootstrap-table11" class="col-sm-5 select-table"></table>-->
<!--            </div>-->
        </div>
        <div class="row col-sm-12"  style="height: 35%;width: 26%">
            <div id="div2" style="height: 100%;width: 100%" >
                <table id="bootstrap-table2" class="col-sm-5 select-table"></table>
            </div>
<!--            <div id="div12" style="height: 100%;width: 100%" >-->
<!--                <table id="bootstrap-table12" class="col-sm-5 select-table"></table>-->
<!--            </div>-->
        </div>
        <div class="row col-sm-12"  style="height: 35%;width: 26%">
            <div id="div3" style="height: 100%;width: 100%" >
                <table id="bootstrap-table3" class="col-sm-5 select-table"></table>
            </div>
<!--            <div id="div13" style="height: 100%;width: 100%" >-->
<!--                <table id="bootstrap-table13" class="col-sm-5 select-table"></table>-->
<!--            </div>-->
        </div>
        <div class="row col-sm-12"  style="height: 35%;width: 26%">
            <div id="div4" style="height: 100%;width: 100%" >
                <table id="bootstrap-table4" class="col-sm-5 select-table"></table>
            </div>
<!--            <div id="div14" style="height: 100%;width: 100%" >-->
<!--                <table id="bootstrap-table14" class="col-sm-5 select-table"></table>-->
<!--            </div>-->
        </div>
        <div class="row col-sm-12"  style="height: 35%;width: 50%">
            <div id="div21" style="height: 100%;width: 100%" >
                <table id="bootstrap-table21" class="col-sm-5 select-table"></table>
            </div>
        </div>

    </div>
</div>

<th:block th:include="include :: footer"/>
<th:block th:include="include :: layout-latest-js"/>
<th:block th:include="include :: ztree-js"/>

<script th:inline="javascript">

    var prefix = ctx + "deviceInfoRk";

    //页面加载完成后执行
    $(function () {
        var panehHidden = false;
        if ($(this).width() < 769) {
            panehHidden = true;
        }
        $('body').layout({initClosed: panehHidden, west__size: 85});
        // 回到顶部绑定
        if ($.fn.toTop !== undefined) {
            var opt = {
                win: $('.ui-layout-center'),
                doc: $('.ui-layout-center')
            };
            $('#scroll-up').toTop(opt);
        }
        // queryUserList();
        queryUserList1();
        queryUserList21();
        queryUserList2();
        queryUserList3();
        queryUserList4();
        // queryUserList11();
        // queryUserList12();
        // queryUserList13();
        // queryUserList14();
        reloadTable();
    });

    function reloadTable() {
        // $('#bootstrap-table').bootstrapTable('refresh');
        $('#bootstrap-table1').bootstrapTable('refresh');
        $('#bootstrap-table21').bootstrapTable('refresh');
        $('#bootstrap-table2').bootstrapTable('refresh');
        $('#bootstrap-table3').bootstrapTable('refresh');
        $('#bootstrap-table4').bootstrapTable('refresh');
        // $('#bootstrap-table11').bootstrapTable('refresh');
        // $('#bootstrap-table12').bootstrapTable('refresh');
        // $('#bootstrap-table13').bootstrapTable('refresh');
        // $('#bootstrap-table14').bootstrapTable('refresh');
        setTimeout(reloadTable, 3 * 1000);
    }


    function queryUserList1() {

        var options1 = {
            url: prefix + "/listcpj",
            height: $("#div1").height() / 1,
            modalName: "入库RGV",
            columns: [
                {
                    field: 'devName',

                    title: '设备名称 '
                },
            {
                    field: 'dw',
                    title: '到位',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未到位";
                        } else if (value == 1) {
                            return "到位";
                        }
                    }
                },
                {
                    field: 'kx',
                    title: '空闲',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "不空闲";
                        } else if (value == 1) {
                            return "空闲";
                        }
                    }
                }
            ]
        };
        $('#bootstrap-table1').bootstrapTable(options1)
    }
    function queryUserList21() {

        var options21 = {
            url: prefix + "/yiceng",
            height: $("#div21").height() / 1,
            modalName: "入库RGV",
            columns: [
                {
                    field: 'devName',
                    title: '设备名称 '
                },
                {
                    field: 'taskNo',
                    title: '任务号 '
                },
                {
                    field: 'dw',
                    title: '到位',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未到位";
                        } else if (value == 1) {
                            return "到位";
                        }
                    }
                },
                {
                    field: 'kx',
                    title: '空闲',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "不空闲";
                        } else if (value == 1) {
                            return "空闲";
                        }
                    }
                },
                {
                    field: 'yxqf',
                    title: '入库请求',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "无请求";
                        } else if (value == 1) {
                            return "请求";
                        }
                    }
                },
                {
                    field: 'trayCode',
                    title: '托盘条码 '
                }
            ]
        };
        $('#bootstrap-table21').bootstrapTable(options21)
    }
    function queryUserList2() {

        var options2 = {
            url: prefix + "/listcpj1",
            height: $("#div2").height() / 1,
            modalName: "入库RGV",
            columns: [
                {
                    field: 'devName',

                    title: '设备名称 '
                },
                {
                    field: 'dw',
                    title: '到位',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未到位";
                        } else if (value == 1) {
                            return "到位";
                        }
                    }
                },
                {
                    field: 'kx',
                    title: '空闲',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "不空闲";
                        } else if (value == 1) {
                            return "空闲";
                        }
                    }
                }
            ]
        };
        $('#bootstrap-table2').bootstrapTable(options2)
    }
    function queryUserList3() {

        var options3 = {
            url: prefix + "/listcpj2",
            height: $("#div3").height() / 1,
            modalName: "入库RGV",
            columns: [
                {
                    field: 'devName',

                    title: '设备名称 '
                },
                {
                    field: 'dw',
                    title: '到位',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未到位";
                        } else if (value == 1) {
                            return "到位";
                        }
                    }
                },
                {
                    field: 'kx',
                    title: '空闲',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "不空闲";
                        } else if (value == 1) {
                            return "空闲";
                        }
                    }
                }
            ]
        };
        $('#bootstrap-table3').bootstrapTable(options3)
    }
    function queryUserList4() {

        var options4 = {
            url: prefix + "/listcpj3",
            height: $("#div4").height() / 1,
            modalName: "入库RGV",
            columns: [
                {
                    field: 'devName',

                    title: '设备名称 '
                },
                {
                    field: 'dw',
                    title: '到位',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未到位";
                        } else if (value == 1) {
                            return "到位";
                        }
                    }
                },
                {
                    field: 'kx',
                    title: '空闲',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "不空闲";
                        } else if (value == 1) {
                            return "空闲";
                        }
                    }
                }
            ]
        };
        $('#bootstrap-table4').bootstrapTable(options4)
    }

    function queryUserList11() {

        var options11 = {
            url: prefix + "/listcpj",
            height: $("#div11").height() / 1,
            modalName: "入库RGV",
            columns: [
                {
                    field: 'devName',

                    title: '设备名称 '
                },
                {
                    field: 'dw',
                    title: '到位',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未到位";
                        } else if (value == 1) {
                            return "到位";
                        }
                    }
                },
                {
                    field: 'kx',
                    title: '空闲',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "不空闲";
                        } else if (value == 1) {
                            return "空闲";
                        }
                    }
                }
            ]
        };
        $('#bootstrap-table11').bootstrapTable(options11)
    }
    function queryUserList12() {

        var options12 = {
            url: prefix + "/listcpj1",
            height: $("#div12").height() / 1,
            modalName: "入库RGV",
            columns: [
                {
                    field: 'devName',

                    title: '设备名称 '
                },
                {
                    field: 'dw',
                    title: '到位',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未到位";
                        } else if (value == 1) {
                            return "到位";
                        }
                    }
                },
                {
                    field: 'kx',
                    title: '空闲',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "不空闲";
                        } else if (value == 1) {
                            return "空闲";
                        }
                    }
                }
            ]
        };
        $('#bootstrap-table12').bootstrapTable(options12)
    }
    function queryUserList13() {

        var options13 = {
            url: prefix + "/listcpj2",
            height: $("#div13").height() / 1,
            modalName: "入库RGV",
            columns: [
                {
                    field: 'devName',

                    title: '设备名称 '
                },
                {
                    field: 'dw',
                    title: '到位',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未到位";
                        } else if (value == 1) {
                            return "到位";
                        }
                    }
                },
                {
                    field: 'kx',
                    title: '空闲',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "不空闲";
                        } else if (value == 1) {
                            return "空闲";
                        }
                    }
                }
            ]
        };
        $('#bootstrap-table13').bootstrapTable(options13)
    }
    function queryUserList14() {

        var options14 = {
            url: prefix + "/listcpj3",
            height: $("#div14").height() / 1,
            modalName: "入库RGV",
            columns: [
                {
                    field: 'devName',

                    title: '设备名称 '
                },
                {
                    field: 'dw',
                    title: '到位',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "未到位";
                        } else if (value == 1) {
                            return "到位";
                        }
                    }
                },
                {
                    field: 'kx',
                    title: '空闲',
                    sortable: true,
                    formatter: function (value, row, index) {
                        if (value == 0) {
                            return "不空闲";
                        } else if (value == 1) {
                            return "空闲";
                        }
                    }
                }
            ]
        };
        $('#bootstrap-table14').bootstrapTable(options14)
    }

</script>
</body>
</html>
